/**
 * @file ai_computer_terminal.h
 * @brief Terminal for AI to send commands to computer
 */

#ifndef AI_COMPUTER_TERMINAL_H
#define AI_COMPUTER_TERMINAL_H

#include "ai_communication_protocol.h"
#include "ai_terminal.h"
#include <queue>

class AIComputerTerminal
{
public:
    AIComputerTerminal();
    
    AIMessage ExecuteAICommand(const AIMessage& aiCommand);
    AIMessage ProcessDataRequest(const AIMessage& request);
    AIMessage GetSystemStatus();
    std::vector<AIMessage> ExecuteBatchCommands(const std::vector<AIMessage>& commands);
    bool IsCommandSafe(const wxString& command);

private:
    AITerminal m_computerTerminal;
    std::queue<AIMessage> m_pendingCommands;
    
    AIMessage HandleFileOperation(const AIMessage& command);
    AIMessage HandleCodeGeneration(const AIMessage& command);
    AIMessage HandleBuildOperation(const AIMessage& command);
    AIMessage HandleSystemOperation(const AIMessage& command);
    bool ContainsDangerousCommands(const wxString& command);
};

#endif
